/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pessoas.iteratorImportacao;

import managementcollaborators.Collaborator;
import pessoas.interfaces.IIteratorImportacao;

/**
 *
 * @author Bush
 */
public class ManagementCollaboratorsIterator implements IIteratorImportacao{
    private Collaborator collaborator[];
    private int pos;
    
    public ManagementCollaboratorsIterator(Collaborator col[]) {
        this.collaborator = col;
    }
        
    @Override
    public Object primeiro() {
        return collaborator[0];
    }

    @Override
    public Object proximo() {
        Object o = collaborator[pos];
        pos++;
        return o;
    }

    @Override
    public boolean existeProximo() {
        if (pos >= collaborator.length) {
            return false;
        } else {
            return true;
        }
    }
    
}
